package com.hjx.entity;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * (SysRole)实体类
 *
 * @author makejava
 * @since 2020-06-09 08:07:17
 */
public class SysRole implements Serializable {
    private static final long serialVersionUID = -29844802473617265L;
    /**
    * 角色编号
    */
    private String rid;
    /**
    * 角色名称
    */
    private String roleName;
    /**
    * 角色描述
    */
    private String roleDesc;
    /**
    * 角色代码
    */
    private String roleCode;
    /**
    * 创建时间
    */
    private LocalDateTime createTime = LocalDateTime.now();
    /**
     * 权重
     */
    private Integer rolePower;

    private List<SysMenu> menus = new ArrayList<>();

    public String getRid() {
        return rid;
    }

    public SysRole setRid(String rid) {
        this.rid = rid;
        return this;
    }

    public String getRoleName() {
        return roleName;
    }

    public SysRole setRoleName(String roleName) {
        this.roleName = roleName;
        return this;
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public SysRole setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
        return this;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public SysRole setRoleCode(String roleCode) {
        this.roleCode = roleCode;
        return this;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public SysRole setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
        return this;
    }

    public List<SysMenu> getMenus() {
        return menus;
    }

    public SysRole setMenus(List<SysMenu> menus) {
        this.menus = menus;
        return this;
    }

    public Integer getRolePower() {
        return rolePower;
    }

    public SysRole setRolePower(Integer rolePower) {
        this.rolePower = rolePower;
        return this;
    }

    @Override
    public String toString() {
        return "SysRole{" +
                "rid='" + rid + '\'' +
                ", roleName='" + roleName + '\'' +
                ", roleDesc='" + roleDesc + '\'' +
                ", roleCode='" + roleCode + '\'' +
                ", createTime=" + createTime +
                ", rolePower=" + rolePower +
                '}';
    }
}
